<?php
namespace App\HttpController;

use EasySwoole\Core\Http\AbstractInterface\Controller;
use EasySwoole\Core\Http\Message\Status;
use EasySwoole\Core\Swoole\ServerManager;
use alipay\Pay;

class Index extends Controller
{
    //测试路径 /index.html
    public function index()
    {
        // TODO: Implement index() method.
        $this->response()->write('Hello World!');
    }
    
    /**
     * 路径 404
     */
    protected function actionNotFound($action): void
    {

        $res = json_encode(['code' => 404, 'msg' => '路径错误'], JSON_UNESCAPED_UNICODE);
        $this->response()->withStatus(200);
        $this->response()->write($res);
    }
}
